import request from '@/utils/request'

//查询用户列表 
export const queryPageApi = (nickname,gender,state,begin,end,pageNum,pageSize) => request.get(`/admin/user/page?nickname=${nickname}&gender=${gender}&state=${state}&begin=${begin}&end=${end}&pageNum=${pageNum}&pageSize=${pageSize}`)
//添加用户
export const addUserApi = (data) => request.post('/admin/user', data)
//根据ID查询用户信息
export const queryInfoApi = (id) => request.get(`/admin/user/${id}`)
//根据Account查询用户信息
export const queryInfoByAccountApi = (account) => request.get(`/admin/user/account/${account}`)
//修改用户信息
export const updateUserApi = (data) => request.put('/admin/user', data)
//删除用户
export const deleteUserApi = (ids) => request.delete(`/admin/user?ids=${ids}`)
//查询所有用户
export const queryAllApi = () => request.get(`/admin/user/all`)
